<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="@{include} :: header"></head>
<style>
    .layui-form-pane .layui-form-label {
        width: 135px;
    }
    .layui-form-pane .layui-input-block {
        margin-left: 135px;
    }
</style>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-row">
            <form class="layui-form layui-form-pane" id="signupForm">
                <input id="id" name="id" th:value="${article.id}" type="hidden">
                <div class="layui-form-item">
                    <label class="layui-form-label">标题：</label>
                    <div class="layui-input-block">
                        <input id="articleTitle" name="articleTitle" th:value="${article.articleTitle}" class="layui-input" type="text" autocomplete="off">
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">分类：</label>
                    <div class="layui-input-block">
                        <select id="newsType" name="newsType" class="layui-input">
                            <option value="">分类</option>
                            <th:block th:each="t : ${newsTypeList}">
                                <option th:value="${t.value}" th:text="${t.name}" th:selected="${article.newsType eq t.value}"></option>
                            </th:block>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">APP列表预览图片：</label>
                    <div class="layui-input-block">
                        <div class="layui-btn-container">
                            <input id="previewImg" name="previewImg" th:value="${article.previewImg}" type="hidden">
                            <div class="layui-upload-drag" id="test10">
                                <i class="layui-icon"></i>
                                <p>点击上传，或将文件拖拽到此处</p>
                                <div class="layui-hide" id="uploadDemoView">
                                    <hr>
                                    <img src="" alt="上传成功后渲染" style="max-width: 196px">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">APP列表预览内容：</label>
                    <div class="layui-input-block">
                        <input id="previewContent" name="previewContent" th:value="${article.previewContent}" class="layui-input" type="text" autocomplete="off">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">极光推送显示内容：</label>
                    <div class="layui-input-block">
                        <input id="jpushContent" name="jpushContent" th:value="${article.jpushContent}" class="layui-input"  type="text" autocomplete="off">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">文章内容：</label>
                    <div class="layui-input-block">
                        <textarea id="content"  th:text="${article.content}" class="layui-textarea"  type="text" autocomplete="off"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">状态：</label>
                    <div class="layui-input-block">
                        <select data-placeholder="--请选择--" name="state" id="state" class="form-control">
                            <option value="1" th:selected="${article.state == 1}">显示</option>
                            <option value="0" th:selected="${article.state == 0}">不显示</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div style="text-align: center;margin-top: 20px">
                        <a onclick="update()" class="layui-btn layui-btn-normal" >提交</a>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript" th:src="@{/js/appjs/module/article/detail.js}"></script>
</body>
</html>
